/*
 * $Id: MinorEventListBuilder.java,v 1.2 2009/07/10 19:53:43 navdeep_mahajan Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.processor.shemjob.guidance.builder;

import org.w3c.dom.Node;

import com.ge.healthcare.autosc.common.exceptions.BasicException;
import com.ge.healthcare.autosc.processor.shemjob.guidance.loader.IGuidanceLoader;

public class MinorEventListBuilder implements IGuidanceElementBuilder {

	/**
	 * Build a single element for a configuration hash table. The element
	 * represents the specified node. Because a validating parser has been used,
	 * the types and values of the underlying nodes have been checked as much as
	 * possible by the parser.
	 * 
	 * @param nodeLabel
	 *            The XML label for the node being represented by the element.
	 * 
	 * @param configNode
	 *            The node which encodes the configuration element.
	 * 
	 * @param domHolder
	 *            The object holding the DOM containing the node. This is used
	 *            to process the node.
	 * 
	 * @return The object to insert into the hash table.
	 * 
	 * @exception Exception
	 *                If an error is detected. The error will be logged by the
	 *                caller.
	 */
	public Object buildElement(String nodeLabel, Node configNode,
			IGuidanceLoader loader) throws BasicException {
		return loader.buildConfigHash(configNode, nodeLabel, "MinorEvent",
				"MinorEventName", "DefaultMinorEvent", "MinorEventGuidance",
				new MinorEventDataBuilder());
	}
}
